<form id="edit-form" class="form-horizontal" style="position:relative;background: #fff" role="form" data-toggle="validator" method="POST" action="">
    <!--script data-main="/assets/js/main" src="/assets/js/require.min.js"></script-->
    <!--script-- src="/assets/js/axios.min.js"></script-->
    <div class="panel-body">
        <div id="myTabContent" class="tab-content" >
            <div class="tab-pane fade active in" id="tabs_0">
                <input type="hidden" id="rel_type" name="data" value='{$rel_type}' />
                <input type="hidden" id="rel_id" name="data" value='{$rel_id}' />
                <fieldset>
                    <legend>基本信息</legend>
                    <div class="form-group">
                        <label for="c-table_id" class="control-label col-xs-12 col-sm-2">事项名称:</label>
                        <div class="col-xs-12 col-sm-8" id="div-table_id">
                            <input type="hidden" id="table_id" name="row[table_id]" value=''/>
                            <select id="c-table_id" name="row[table_id]" class="form-control" title="table_id" ></select>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>课程信息</legend>
                    <div class="form-group">
                        <label for="c-table_id" class="control-label col-xs-12 col-sm-2">课程名称:</label>
                        <div class="col-xs-12 col-sm-8" id="div-event_name">
                            <input type="text" id="event_name" name="row[event_name]" class="form-control" value=''/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-ocourse_logo" class="control-label col-xs-12 col-sm-2">课程封面:</label>
                        <div class="col-xs-12 col-sm-8" id="div-school_logo" >
                            <div class="form-inline">
                                <input id="c-ocourse_logo" class="form-control" size="37" name="row[ocourse_logo]" type="text" value="" >
                                <span><button type="button" id="plupload-ocourse_logo" class="btn btn-danger plupload" data-input-id="c-ocourse_logo" data-mimetype="image/*" data-multiple="false" data-preview-id="p-ocourse_logo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                <span><button type="button" id="fachoose-ocourse_logo" class="btn btn-primary fachoose" data-input-id="c-ocourse_logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                <ul class="row list-inline plupload-preview" id="p-ocourse_logo"></ul>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-table_id" class="control-label col-xs-12 col-sm-2">课程内容:</label>
                        <div class="col-xs-12 col-sm-8" id="div-eval_content">
                            <textarea type="text" id="event_content" name="row[event_content]" class="form-control editor">

                            </textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-subject_lv" class="control-label col-xs-12 col-sm-2">课程类型:</label>
                        <div class="col-xs-12 col-sm-8" id="div-eval_type">
                            <input type="hidden" id="subject_lv" name="subject_lv" value=''/>
                            <select type="number" id="c-subject_lv" name="subject_lv" class="form-control"
                                    title="eval_type" disabled/></select>
                        </div>
                    </div>
                </fieldset>

                <fieldset>
                    <legend>参数设置</legend>
                    <div class="form-group">
                        <label for="c-subject_lv" class="control-label col-xs-12 col-sm-2">课前打卡时间:</label>
                        <div class="col-xs-12 col-sm-8" id="div-prechenkintime">
                            <input type="text" id="prechenkintime" name="row[prechenkintime]" class="form-control" value=''/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-subject_lv" class="control-label col-xs-12 col-sm-2">课后打卡时间:</label>
                        <div class="col-xs-12 col-sm-8" id="div-prechenkouttime">
                            <input type="text" id="prechenkouttime" name="row[prechenkouttime]" class="form-control" value=''/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-subject_lv" class="control-label col-xs-12 col-sm-2">评价开始时间:</label>
                        <div class="col-xs-12 col-sm-8" id="div-evalstart">
                            <input type="text" id="evalstart" name="row[evalstart]" class="form-control" value=''/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-subject_lv" class="control-label col-xs-12 col-sm-2">评价结束时间:</label>
                        <div class="col-xs-12 col-sm-8" id="div-evalend">
                            <input type="text" id="evalend" name="row[evalend]" class="form-control" value=''/>
                        </div>
                    </div>
                </fieldset>
                <fieldset id="app">
                    <legend>老师模式</legend>
                    <div class="form-group">
                        <label for="c-subject_lv" class="control-label col-xs-12 col-sm-2">老师岗:</label>
                        <div class="col-xs-12 col-sm-8" id="div-teacher">
                            <teacher-box  :type="''" :left-options="leftOptions" :right-options="rightOptions"></teacher-box>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-subject_lv" class="control-label col-xs-12 col-sm-2">管理岗:</label>
                        <div class="col-xs-12 col-sm-8" id="div-manger">
                            <manager-box :type="''" :left-options="leftOptions" :right-options="rightOptions"></manager-box>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>课堂信息</legend>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">课堂类型:</label>
                        <div class="col-xs-12 col-sm-8" id="div-course_type">
                            {if $admin.group_id==3 || $admin.group_id==2|| $admin.group_id==1}
                            <label for="row[course_type]-1"><input id="row[course_type]-1" name="row[course_type]"
                                                                   type="radio" value="1" /> 学校课堂</label>{/if}
                            {if $admin.group_id==8 || $admin.group_id==2|| $admin.group_id==1}
                            <label for="row[course_type]-2"><input id="row[course_type]-2" name="row[course_type]"
                                                                   type="radio" value="2"/> 社区课堂</label>{/if}

                            <label for="row[course_type]-3"><input id="row[course_type]-3" name="row[course_type]"
                                                                   type="radio" value="3"/> 校外课堂</label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-subjectlv_id_A" class="control-label col-xs-12 col-sm-2">一级学科:</label>
                        <div class="col-xs-12 col-sm-8" id="div-subjectlv_id_A">
                            <input type="text" id="c-subjectlv_id_A"  class="form-control" name="row[subjectlv_id_A]" value='' readonly disabled/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-subjectlv_id_B" class="control-label col-xs-12 col-sm-2">二级学科:</label>
                        <div class="col-xs-12 col-sm-8" id="div-subjectlv_id_B">
                            <input type="text" id="c-subjectlv_id_B"  class="form-control" name="row[subjectlv_id_B]" value='' readonly disabled/>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>教学点</legend>
                    <div class="form-group">
                        <label for="c-addresslv_id_A" class="control-label col-xs-12 col-sm-2">一级教学点:</label>
                        <div class="col-xs-12 col-sm-8" id="div-addresslv_id_A">
                            <input type="text" id="c-addresslv_id_A"  class="form-control" name="addresslv_id_A" value='' readonly/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-addresslv_id_B" class="control-label col-xs-12 col-sm-2">二级教学点:</label>
                        <div class="col-xs-12 col-sm-8" id="div-addresslv_id_B">
                            <input type="text" id="c-addresslv_id_B"  class="form-control" name="addresslv_id_B" value='' readonly/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-address" class="control-label col-xs-12 col-sm-2">上课地点:</label>
                        <div class="col-xs-12 col-sm-8" id="div-address">
                            <input type="text" id="c-address" name="row[address]" class="form-control" value='' readonly/>
                        </div>
                    </div>

                </fieldset>
                <fieldset>
                    <legend>课程日期筛选</legend>
                    <div class="form-group">
                        <label for="c-ocourse_conut" class="control-label col-xs-12 col-sm-2">课程长度:</label>
                        <div class="col-xs-12 col-sm-8" id="div-ocourse_conut" >
                            <input type="number" id="c-ocourse_conut" name="row[ocourse_conut]" value="" class="form-control" title="ocourse_conut" data-rule="require num" data-rule-num="[/^[0-9\.]+$/, '只能填入数值']" placeholder="只能填入数值"  data-tip="课程长度" disabled />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-ocourse_conut" class="control-label col-xs-12 col-sm-2">一周几次课:</label>
                        <div class="col-xs-12 col-sm-8" id="div-classes_per_week" >
                            <input type="number" id="c-classes_per_week" name="row[classes_per_week]" value="" class="form-control" title="ocourse_conut" data-rule="require num" data-rule-num="[/^[0-9\.]+$/, '只能填入数值']" placeholder="只能填入数值"  data-tip="课程长度" disabled />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-ocourse_conut" class="control-label col-xs-12 col-sm-2">时点:</label>
                        <div class="col-xs-12 col-sm-8 heng" >
                            <input type="text" id="c-week" name="row[week]" value="" class="form-control" data-rule="require" style="width:55px" disabled />
                            <input type="text" id="c-daytime" name="row[daytime]" value="" class="form-control" data-rule="require"  style="width:55px" disabled />
                            <span>第</span><input type="text" id="c-oindex" name="row[oindex]" value="" class="form-control" data-rule="require"  style="width:55px" disabled /><span>节课</span>
                            <span>上课时间</span><input type="text" id="c-start_time" name="row[start_time]" value="" class="form-control" data-rule="require "  style="width:60px" disabled /><span>到</span>
                            <input type="text" id="c-end_time" name="row[end_time]" value="" class="form-control" data-rule="require "  style="width:60px" disabled />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-ocourse_conut" class="control-label col-xs-12 col-sm-2">起始日期:</label>
                        <div class="col-xs-12 col-sm-8 heng" >
                            <input type="text" id="c-start_date" name="row[start_date]" value="" class="form-control" data-rule="require"  disabled />
                            <span>到</span><input type="text" id="c-end_date" name="row[end_date]" value="" class="form-control" data-rule="require"  disabled />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-ocourse_conut" class="control-label col-xs-12 col-sm-2">是否排除国际假日:</label>
                        <div class="col-xs-12 col-sm-8 heng" >
                            <input type="checkbox" id="c-exclint_holidays" name="row[exclint_holidays]"  data-rule="require"  disabled />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-same_classroom" class="control-label col-xs-12 col-sm-2">是否同一间教室:</label>
                        <div class="col-xs-12 col-sm-8" id="div-same_classroom" ><input  class="c-switch" id="c-same_classroom" name="row[same_classroom]" type="hidden" value="">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" id="aaa" data-input-id="c-switch" data-yes="1" data-no="0" >
                                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
                            </a>                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-same_ocation" class="control-label col-xs-12 col-sm-2">是否同一二级教学点:</label>
                        <div class="col-xs-12 col-sm-8" id="div-same_ocation" ><input  class="c-switch" name="row[same_ocation]" type="hidden" value="">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
                            </a>                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-can_same_day" class="control-label col-xs-12 col-sm-2">是否能排在同一天:</label>
                        <div class="col-xs-12 col-sm-8" id="div-can_same_day" ><input  class="c-switch" name="row[can_same_day]" type="hidden" value="">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on text-success  fa-2x"></i>
                            </a>                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-daytime" class="control-label col-xs-12 col-sm-2">时段选择:</label>
                        <div class="col-xs-12 col-sm-8" id="div-daytime">
                                 <label for="row[daytime]-1">
                                <input id="row[daytime]-1" name="row[daytime][]" type="checkbox"
                                       value="1"/> 上午</label>
                            <label for="row[daytime]-2"><input id="row[daytime]-2" name="row[daytime][]" type="checkbox"
                                value="2"/> 中午</label>
                            <label for="row[daytime]-3"><input id="row[daytime]-3" name="row[daytime][]" type="checkbox"
                                  value="3"/> 下午</label>
                            <label for="row[daytime]-4"><input id="row[daytime]-4" name="row[daytime][]" type="checkbox"
                                   value="4"/> 晚上</label>
                            <select  id="c-daytime-all"  style="display: none" multiple name="row[daytimeall][]" value="" class="form-control"  style="height:250px"  data-tip="时段选择"  >
                            </select>
                        </div>

                    </div>
                </fieldset>
                <fieldset>
                    <legend>班级信息</legend>
                    <div class="form-group">
                        <label for="c-classes_id" class="control-label col-xs-12 col-sm-2">班名:</label>
                        <div class="col-xs-12 col-sm-8" id="div-classes_id">
                            <input type="hidden" id="classes_id" name="row[classes_id]" value=''/>
                            <select name="row[classes_id]" id="c-classes_id" class="form-control" disabled></select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-ocation_id" class="control-label col-xs-12 col-sm-2">教室:</label>
                        <div class="col-xs-12 col-sm-8" id="div-ocation_id">
                            <input type="hidden" id="ocation_id" name="row[ocation_id]" value=''/>
                            <select name="row[ocation_id]" id="c-ocation_id" class="form-control" disabled>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-date" class="control-label col-xs-12 col-sm-2">日期:</label>
                        <div class="col-xs-12 col-sm-8" id="div-date">
                            <div class="form-inline">
                                <input type="text" id="c-date" name="row[date]" value=""
                                       class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="日期"
                                       data-rule=""/>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-week" class="control-label col-xs-12 col-sm-2">周几:</label>
                        <div class="col-xs-12 col-sm-8" id="div-week">
                            <input type="text" id="c-week" name="row[week]" value="" class="form-control"
                                   title="week" placeholder="" data-rule="" data-tip="周几"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-start_time" class="control-label col-xs-12 col-sm-2">时段:</label>
                        <div class="col-xs-12 col-sm-8 heng" id="div-daytime">
                            <input type="text" id="c-start_time" name="row[start_time]" value=""
                                   class="form-control"/><span>到</span>
                            <input type="text" id="c-end_ime" name="row[end_time]" value=""
                                   class="form-control" value=""/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-oindex" class="control-label col-xs-12 col-sm-2">课节:</label>
                        <div class="col-xs-12 col-sm-8" id="div-oindex">
                            <input type="text" id="c-oindex" name="row[class_index]" value=""
                                   class="form-control" title="oindex" placeholder="" data-rule="" data-tip="课节"/>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>班级信息</legend>
                    <div class="form-group">
                        <label for="c-bz" class="control-label col-xs-12 col-sm-2">备注:</label>
                        <div class="col-xs-12 col-sm-8" id="div-bz" >
                            <input type="text" id="c-bz" name="row[bz]" value="" class="form-control" title="bz"  placeholder="" data-rule=""  data-tip="备注"  />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-status" class="control-label col-xs-12 col-sm-2">状态:</label>
                        <div class="col-xs-12 col-sm-8" id="div-status" >
                            <input id="c-status" name="row[status]" type="hidden" value="">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on text-success fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div data-favisible="switch=1" class="p-3">已开户</div>                        </div>
                    </div>
                </fieldset>
                <div class="form-group layer-footer">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 col-sm-8">
                        <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                    </div>
                </div>
            </div>

        </div>
    </div>
</form>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            leftOptions: Config.leftOptions,
            rightOptions: Config.rightOptions
        }
    });
</script>
